package base.thread.staticProxy;

/**
 * @Author: my_code
 * @Create: 2020-12-07 13:50
 *
 * Thread类采用了静态代理的方式，类比此例子
 */
public class WeddingCompany implements Marry {

    private Marry target;

    public WeddingCompany(Marry target) {
        this.target = target;

    }

    @Override
    public void happyMarry() {
        before();
        this.target.happyMarry();
        after();

    }

    private void after() {
        System.out.println("结婚之后,收尾款");
    }

    private void before() {
        System.out.println("结婚之前,布置现场");
    }
}
